import React from "react";
import ReactDOM from "react-dom";
import "babel-polyfill";
import Foo from "./component/Foo";
import RX from "./component/RX";
import Provider from "./component/Provider";
import "./utils/rem";
import "./css/index.css";
import "./css/style.styl";

import "@css/App.less";

class App extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      store: {
        userName: "lansezhaji"
      }
    };
  }
  componentWillMount() {
    let _that = this;
    setInterval(function() {
      let time = +new Date();
      _that.setState({
        store: {
          userName: "lansezhaji+" + time
        }
      });
    }, 2000);
  }

  render() {
    const store = this.state;
    return (
      <Provider store={store}>
        <div>
          <RX />
        </div>
      </Provider>
    );
  }
}
var oBox = document.getElementById("root");
ReactDOM.render(<App />, oBox);
export default App;
